package com.zl.bcyappserver.service.bcy.impl;

import com.zl.bcyappserver.domain.dao.Tag;
import com.zl.bcyappserver.repository.TagRepository;
import com.zl.bcyappserver.service.bcy.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by ZhongLeiDev at 2019/12/4
 */
@Service
public class TagServiceImpl implements TagService {

    private TagRepository tagRepository;

    @Autowired
    public TagServiceImpl(TagRepository tagRepository) {
        this.tagRepository = tagRepository;
    }

    @Override
    public Tag findByTagId(long tagId) {
        return tagRepository.findByTagId(tagId);
    }

    @Override
    public Tag Save(Tag tag) {
        return tagRepository.save(tag);
    }
}
